//
//  DateHelper.m
//  TestDemo
//
//  Created by myApple on 16/2/23.
//  Copyright (c) 2016年 myApple. All rights reserved.
//

#import "DateHelper.h"

@implementation DateHelper

#pragma mark ----------------获取当前时间戳
+(NSString *)getTimestamp
{
    NSDate * nowDate = [NSDate dateWithTimeIntervalSinceNow:0];
    NSDateFormatter * dateFormatter = [[NSDateFormatter alloc]init];
    [dateFormatter setDateFormat:@"yyyyMMddHHmmss"];
    NSString * dateString = [dateFormatter stringFromDate:nowDate];
    
    NSString * timestamp = [dateString substringWithRange:NSMakeRange(2, 10)];
    return timestamp;
}

@end
